package ttOrder.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ttOrder.dao.OrdersDAOImpl;
import ttOrder.model.Orders;

@Service
@Transactional
public class OrdersServiceImpl implements IOrdersService {

	@Autowired
	private OrdersDAOImpl ordersDAO;

	@Override
	public List<Orders> findAllOrders() {
		return ordersDAO.findAllOrders();
	}

	@Override
	public Orders getOrdersById(Integer id) {
		return ordersDAO.getOrdersById(id);
	}

	@Override
	public void createOrders(Orders orders) throws Exception {
		ordersDAO.createOrders(orders);
	}

	@Override
	public void editOrders(Integer id) throws Exception {
		ordersDAO.editOrders(id);
	}

	@Override
	public void editOrders1(Orders orders) throws Exception {
		ordersDAO.editOrders1(orders);
	}

	@Override
	public void deleteOrders(Integer id) throws Exception {
		ordersDAO.deleteOrders(id);
	}

}
